//加载文件
import 'package:flutter/material.dart';

//本地icon 图片等处理
class RoucesUtil {
  static getAssets(str) {
    return 'images/' + str + '.png';
  }

  //返回icon
  static Widget getAssetsWidget(str) {
    return Image.asset(getAssets(str));
  }

  //宽高相等的icon
  static Widget getAssetsIcon(str, double size) {
    return Image.asset(
      RoucesUtil.getAssets(str),
      width: size,
      height: size,
    );
  }
}
